L = [1, 2, 3, 4]

List = [[]]
for i in range(len(L)):     # 定长
  for j in range(len(List)): # 变长
    sub_List = List[j] + [L[i]]
    if sub_List not in L:
      List.append(sub_List)
print('List =', List)